/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package domaci3.model;

/**
 *
 * @author Ilija
 */
public class Pravougaonik extends Cvor{

    private double stranicaA;
    private double stranicaB;
    
    public Pravougaonik(double a, double b){
        stranicaA = a;
        stranicaB = b;
    }
    
    @Override
    public String prikazi() {
        String string = "Pravougaonik [a="+stranicaA+"; b="+stranicaB+"; Obim="+izracunajObim()+"]";
        return string;
    }

    @Override
    public double izracunajObim() {
        return 2*(stranicaA+stranicaB);
    }
    
        public double getStranicaA() {
        return stranicaA;
    }

    public void setStranicaA(double stranicaA) {
        this.stranicaA = stranicaA;
    }

    public double getStranicaB() {
        return stranicaB;
    }

    public void setStranicaB(double stranicaB) {
        this.stranicaB = stranicaB;
    }
}
